home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW Related / DTS MPW Goodies / CvtCComments < prev    next >
Encoding:
Text File  |  1990-09-14  |  692 b   |  34 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        CvtCComments
  3. #
  4. #    Contains:    Simple script to convert 1 line C comments
  5. #                to C++ '//' form. Will do very bad things
  6. #                to your code if you have normal C comments
  7. #                before real code on a line.
  8. #
  9. #    Written by:    Andrew Shebanow
  10. #
  11. #    Copyright:    © 1990 by Apple Computer, Inc., all rights reserved.
  12. #
  13. #    Change History (most recent first):
  14. #
  15. #                  2/7/90    AGS        Created
  16. #
  17. #    To Do:
  18. #
  19.  
  20.  
  21. # Make sure user passed a filename
  22. If {#} != 1
  23.     Echo "Usage: CvtComments fileName" > Dev:StdErr
  24.     Exit 1
  25. End
  26. # Open The File
  27. Target "{1}"
  28. # Find The Top
  29. Find •
  30. # Convert one line comments from C form to C++ form
  31. replace -c ∞ /∂/∂*[ ∂t]+(≈)®1[ ∂t]+∂*∂// "// ®1"
  32. # Save & Close the file
  33. Close -y "{1}"
  34.